package com.easy.service.impl;

import com.easy.bean.Collect;
import com.easy.dao.CollectDao;
import com.easy.service.ICollectService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class CollectService implements ICollectService {
    @Autowired
    CollectDao collectDao;
    @Override
    public List<Collect> getCollectList(Page page, String text) {
        return collectDao.getCollectList(page,text);
    }

    @Override
    public int CollectCount(String text) {
        return collectDao.CollectCount(text);
    }

    @Override
    public int addCollect(Collect collect) {
        return collectDao.addCollect(collect);
    }

    @Override
    public int editCollect(Collect collect) {
        return collectDao.editCollect(collect);
    }

    @Override
    public int deleteCollect(int userid, int proid) {
        return collectDao.deleteCollect(userid,proid);
    }

    @Override
    public List<Collect> collectList(int userid) {
        return collectDao.collectList(userid);
    }
}
